<?php
	####################################################
	# library import and object instance.              #
	####################################################
	# 공통 파일을 인클루드 한다.
	include_once( './common.php' );

	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)
	$req = $_REQUEST;
	$files = $_FILES;
	//$req = Request::clean_request($_REQUEST, 1);

	# GET(url variables)

	# POST(form variables)
	$pmode = Request::clean_individual($_POST['mode']);
	$preturl = Request::clean_individual($_POST['returl']);
	//Nlog::put('pmode',$pmode);
	//Nlog::put('preturl',$preturl);
	//$pdic = NForm::dictionary($p, 'puid');


	# Validation(special case validate)
	//*/
	Validation::check_is_emptys($pmode);
	Validation::check_is_emptys($preturl);
	//*/
	####################################################
	# implementation                                   #
	####################################################
	$sec->run();

	switch($pmode) {
		case "new":
			$retname = NImg::make_thumbs($_FILES['img'], "./temp/img/", array(10,20,30,40,50,60,70,80,90,150,300));
		break;

		default : break;
	} //endswitch


?>
<?php
	# HTML START
	echo $html->custom_header(TITLE);
	echo $tplt->page_construct_javascript();
	echo $html->custom_js("{$JS}common.js");
	echo $html->custom_css("{$CSS}common.css");
	echo $html->custom_body();
?>
	<?php //$tplt->app_head($NAVI)?>
	<?php //$tplt->tiles_admin_sidebar($NAVI)?>
	<?php //$tplt->tiles_admin_contents($pkname, $pname, $pdesc)?>


	<div class="msgbox">
		<p>
			<?php switch($pmode) :

				case "new" : ?>
					<strong>message</strong><br />
					<img src="./temp/img/<?=$retname?>_50" />
					<img src="./temp/img/<?=$retname?>_90" />
					<img src="./temp/img/<?=$retname?>_150" />
					<img src="./temp/img/<?=$retname?>_300" />
				<?php break; ?>


				<?php default : break; ?>
			<?php endswitch; ?>
		</p>
	</div>
	<span class="cbtn_s mart5" onclick="Mover.href('<?=$preturl?>');">확인</span>

<?php
	# HTML END
	//echo $tplt->tiles_admin_footer();
	//echo $tplt->page_destruct_javascript();
	include_once('./endproc.php');
	echo $html->html_footer();
?>